#ifndef PUMPPULSECOMPENCURVEPAGE_H
#define PUMPPULSECOMPENCURVEPAGE_H

#include <QWidget>
#include <QVBoxLayout>
#include "curve.h"

class HplcPumpPulseCompenCurvePage : public QWidget
{
    Q_OBJECT

public:
    explicit HplcPumpPulseCompenCurvePage(QWidget *parent = nullptr);
    virtual ~HplcPumpPulseCompenCurvePage() override;

    void update(double data);
    void updatePeriod();

protected:
    virtual void closeEvent(QCloseEvent *event) override;

public slots:
    void onSaveAsPeriod();

private:
    QList<double> m_buffer;

    Curve *m_curve;
    Curve *m_periodCurve;
    QPushButton *m_pbSaveAsPeriod;

    QVBoxLayout *m_vbl;
};

#endif // PUMPPULSECOMPENCURVEPAGE_H
